package com.crm.mapper;

import com.crm.pojo.Order;
import com.sun.org.apache.xpath.internal.operations.Or;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface orderMapper {

    @Insert("INSERT INTO `order`(uid, cid, gid, num, total, datatime) VALUES (#{uid},#{cid},#{gid},#{num},#{total},#{datatime})")
    boolean addOrder(Order order);

    @Select("select * from `order`")
    List<Order> selectAll();
    @Delete("delete from `order` where oid=#{oid}")
    boolean deleteByOid(int oid);
}
